import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsEnum, Min } from 'class-validator';
import { PaymentChannel } from '../entities/user-recharge.entity';

/**
 * 发起充值DTO
 */
export class InitiateRechargeDto {
  @ApiProperty({ description: '充值金额（单位：分）', example: 10000 })
  @IsNumber()
  @Min(0.01, { message: '充值金额不能少于0.01分' })
  amount: number;

  @ApiProperty({ 
    description: '支付渠道', 
    enum: PaymentChannel,
    example: PaymentChannel.WECHAT 
  })
  @IsEnum(PaymentChannel)
  paymentChannel: PaymentChannel;
}